﻿using CodingDojo.Domain.KataRomanNumerals;
using NUnit.Framework;

namespace CodingDojo.Domain.Test.KataRomanNumerals
{
  [TestFixture]
  public class TestKataRomanNumerals
  {
    private IRomanNumerals _romanNumerals;

    [SetUp]
    public void Init()
    {
      _romanNumerals = new RomanNumerals();
    }

    [Test]
    public void Test_1_Returns_I()
    {
      Assert.AreEqual("I", _romanNumerals.IntegerToRoman(1));
    }

    [Test]
    public void Test_2_Returns_II()
    {
      Assert.AreEqual("II", _romanNumerals.IntegerToRoman(2));
    }

    [Test]
    public void Test_3_Returns_III()
    {
      Assert.AreEqual("III", _romanNumerals.IntegerToRoman(3));
    }

    [Test]
    public void Test_4_Returns_IV()
    {
      Assert.AreEqual("IV", _romanNumerals.IntegerToRoman(4));
    }

    [Test]
    public void Test_5_Returns_V()
    {
      Assert.AreEqual("V", _romanNumerals.IntegerToRoman(5));
    }

    [Test]
    public void Test_6_Returns_VI()
    {
      Assert.AreEqual("VI", _romanNumerals.IntegerToRoman(6));
    }

    [Test]
    public void Test_7_Returns_VII()
    {
      Assert.AreEqual("VII", _romanNumerals.IntegerToRoman(7));
    }

    [Test]
    public void Test_8_Returns_VIII()
    {
      Assert.AreEqual("VIII", _romanNumerals.IntegerToRoman(8));
    }

    [Test]
    public void Test_9_Returns_IX()
    {
      Assert.AreEqual("IX", _romanNumerals.IntegerToRoman(9));
    }

    [Test]
    public void Test_10_Returns_X()
    {
      Assert.AreEqual("X", _romanNumerals.IntegerToRoman(10));
    }

    [Test]
    public void Test_11_Returns_XI()
    {
      Assert.AreEqual("XI", _romanNumerals.IntegerToRoman(11));
    }

    [Test]
    public void Test_12_Returns_XII()
    {
      Assert.AreEqual("XII", _romanNumerals.IntegerToRoman(12));
    }

    [Test]
    public void Test_20_Returns_XX()
    {
      Assert.AreEqual("XX", _romanNumerals.IntegerToRoman(20));
    }

    [Test]
    public void Test_99_Returns_XCIX()
    {
      Assert.AreEqual("XCIX", _romanNumerals.IntegerToRoman(99));
    }

    [Test]
    public void Test_1999_Returns_MCMXCIX()
    {
      Assert.AreEqual("MCMXCIX", _romanNumerals.IntegerToRoman(1999));
    }

    [Test]
    public void Test_3000_Returns_MMM()
    {
      Assert.AreEqual("MMM", _romanNumerals.IntegerToRoman(3000));
    }

    [Test]
    public void Test_3001_Returns_Error()
    {
      Assert.AreEqual("the number must be between 1 and 3000", _romanNumerals.IntegerToRoman(30001));
    }

    [Test]
    public void Test_0_Returns_Error()
    {
      Assert.AreEqual("the number must be between 1 and 3000", _romanNumerals.IntegerToRoman(0));
    }
  }
}
